// ==UserScript==
// @name         洛谷娱乐插件·OIER2020
// @namespace    http://tampermonkey.net/
// @version      1.3.2
// @description  在洛谷题库右下角（也就是广告处）添加猫和老鼠，供大家娱乐使用
// @author       jyb666（制作插件）&george_jiang（制作GIF）
// @match        *://www.luogu.com.cn/problem/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
  'use strict';
  var url = Array(
"https://www.helloimg.com/images/2021/05/11/BklyZr.gif",
"https://www.helloimg.com/images/2021/05/11/Bklj8q.gif",
"https://www.helloimg.com/images/2021/05/11/BklhMc.gif",
"https://www.helloimg.com/images/2021/05/11/Bklf3h.png",
"https://www.helloimg.com/images/2021/05/11/BklVVm.png",
"https://www.helloimg.com/images/2021/05/11/Bklrc0.jpg",
"https://www.helloimg.com/images/2021/05/11/Bklkm5.gif",
"https://www.helloimg.com/images/2021/05/11/BklUyA.gif",
"https://www.helloimg.com/images/2021/05/11/BklKQz.png",
"https://www.helloimg.com/images/2021/05/11/Bkl8SR.jpg",
"https://www.helloimg.com/images/2021/05/11/Bkl6Zn.gif",
"https://www.helloimg.com/images/2021/05/11/Bkl7MP.png",
"https://www.helloimg.com/images/2021/05/11/Bklz3M.gif",
"https://www.helloimg.com/images/2021/05/11/BklQrg.png",
"https://www.helloimg.com/images/2021/05/11/BklNcX.gif",
"https://www.helloimg.com/images/2021/05/11/Bkl0J9.png",
"https://www.helloimg.com/images/2021/05/11/BklvuY.gif",
"https://www.helloimg.com/images/2021/05/11/BkldQE.gif",
"https://www.helloimg.com/images/2021/05/11/BklcLv.gif",
"https://www.helloimg.com/images/2021/05/11/BklORu.jpg",
"https://www.helloimg.com/images/2021/05/11/BklW6t.jpg",
"https://www.helloimg.com/images/2021/05/11/BklTlQ.jpg",
"https://www.helloimg.com/images/2021/05/11/BkllrS.jpg",
"https://www.helloimg.com/images/2021/05/11/BklbOD.gif",
"https://www.helloimg.com/images/2021/05/11/BklSNK.gif",
"https://www.helloimg.com/images/2021/05/11/BklLL1.png",
"https://www.helloimg.com/images/2021/05/11/BklART.png",
"https://www.helloimg.com/images/2021/05/11/BkltIr.gif",
"https://www.helloimg.com/images/2021/05/11/Bklslq.gif",
"https://www.helloimg.com/images/2021/05/11/BklEkh.png",
"https://www.helloimg.com/images/2021/05/11/BklxOm.png",
"https://www.helloimg.com/images/2021/05/11/BklqE0.gif",
"https://www.helloimg.com/images/2021/05/11/BklXu5.gif",
"https://www.helloimg.com/images/2021/05/11/Bkl3NA.png",
"https://www.helloimg.com/images/2021/05/11/Bkl1Az.gif",
"https://www.helloimg.com/images/2021/05/11/BklaRR.gif",
"https://www.helloimg.com/images/2021/05/11/BklFIn.png",
"https://www.helloimg.com/images/2021/05/11/Bklob6.gif",
"https://www.helloimg.com/images/2021/05/11/BklZ1P.png",
"https://www.helloimg.com/images/2021/05/11/BklGkM.gif",
"https://www.helloimg.com/images/2021/05/11/BklC9g.gif",
"https://www.helloimg.com/images/2021/05/11/BklBEX.gif",
"https://www.helloimg.com/images/2021/05/11/Bkbyj9.gif",
"https://www.helloimg.com/images/2021/05/11/Bkbu0Y.gif",
"https://www.helloimg.com/images/2021/05/11/BkbjAE.gif",
"https://www.helloimg.com/images/2021/05/11/Bkb7G1.jpg",
"https://www.helloimg.com/images/2021/05/11/BkbpDT.jpg",
"https://www.helloimg.com/images/2021/05/11/BkbvWh.png",
"https://www.helloimg.com/images/2021/05/11/Bkbdxm.jpg",
"https://www.helloimg.com/images/2021/05/11/BkbMDR.jpg",
"https://www.helloimg.com/images/2021/05/11/BkblHn.png",
"https://www.helloimg.com/images/2021/05/11/BkbbP6.jpg",
"https://www.helloimg.com/images/2021/05/11/BkbSqg.png",
"https://www.helloimg.com/images/2021/05/11/BkbAhX.jpg",
"https://www.helloimg.com/images/2021/05/11/Bkb4w9.jpg",
"https://www.helloimg.com/images/2021/05/11/BkbttY.gif",
"https://www.helloimg.com/images/2021/05/11/BkbsCE.jpg",
"https://www.helloimg.com/images/2021/05/11/BkbJ7v.png",
"https://www.helloimg.com/images/2021/05/11/BkbEnu.jpg",
"https://www.helloimg.com/images/2021/05/11/BkbxPt.png",
"https://www.helloimg.com/images/2021/05/11/BkbeUQ.gif",
"https://www.helloimg.com/images/2021/05/11/BkbXWC.gif",
"https://www.helloimg.com/images/2021/05/11/Bkb3qS.gif",
"https://www.helloimg.com/images/2021/05/11/BkbafD.gif",
"https://www.helloimg.com/images/2021/05/11/BkbPwo.jpg",
"https://www.helloimg.com/images/2021/05/11/BkbFtb.jpg",
"https://www.helloimg.com/images/2021/05/11/BkboBK.gif",
"https://www.helloimg.com/images/2021/05/11/BkbR71.gif",
"https://www.helloimg.com/images/2021/05/11/BkbGnT.gif",
"https://www.helloimg.com/images/2021/05/11/BkbCFr.gif",
"https://www.helloimg.com/images/2021/05/11/Bkb5Uq.gif",
"https://www.helloimg.com/images/2021/05/11/BkHyTc.gif",
"https://www.helloimg.com/images/2021/05/11/BkHueh.gif",
"https://www.helloimg.com/images/2021/05/11/BkHhfm.png",
"https://www.helloimg.com/images/2021/05/11/BkHfv0.gif",
"https://www.helloimg.com/images/2021/05/11/BkHYt5.png",
"https://www.helloimg.com/images/2021/05/11/BkHVBA.gif",
"https://www.helloimg.com/images/2021/05/11/BkHkzz.gif",
"https://www.helloimg.com/images/2021/05/11/BkHgnR.gif",
"https://www.helloimg.com/images/2021/05/11/BkHUFn.gif",
"https://www.helloimg.com/images/2021/05/11/BkH8K6.gif",
"https://www.helloimg.com/images/2021/05/11/BkH6TP.gif",
"https://www.helloimg.com/images/2021/05/11/BkHIeM.png",
"https://www.helloimg.com/images/2021/05/11/BkH7Yg.png",
"https://www.helloimg.com/images/2021/05/11/BkHzvX.gif",
"https://www.helloimg.com/images/2021/05/11/BkHps9.jpg",
"https://www.helloimg.com/images/2021/05/11/BkHQ5Y.jpg",
"https://www.helloimg.com/images/2021/05/11/BkH0zE.gif",
"https://www.helloimg.com/images/2021/05/11/BkHwiv.gif",
"https://www.helloimg.com/images/2021/05/11/BkHvou.gif",
"https://www.helloimg.com/images/2021/05/11/BkHcKt.gif",
"https://www.helloimg.com/images/2021/05/11/BkHO2Q.gif",
"https://www.helloimg.com/images/2021/05/11/BkH9eC.jpg",
"https://www.helloimg.com/images/2021/05/11/BkHTYS.gif",
"https://www.helloimg.com/images/2021/05/11/BkH2dD.gif",
"https://www.helloimg.com/images/2021/05/11/BkHMso.gif",
"https://www.helloimg.com/images/2021/05/11/BkHHpK.gif",
"https://www.helloimg.com/images/2021/05/11/BkHni1.gif",
"https://www.helloimg.com/images/2021/05/11/BkHioT.png",
"https://www.helloimg.com/images/2021/05/11/BkHL8r.gif",
"https://www.helloimg.com/images/2021/05/11/BkHA2q.gif",
"https://www.helloimg.com/images/2021/05/11/BkH4Xc.gif"
  );
  function randomNum(minNum,maxNum){ 
    switch(arguments.length){ 
      case 1: 
        return parseInt(Math.random()*minNum+1,10); 
      break; 
      case 2:
        return parseInt(Math.random()*(maxNum-minNum+1)+minNum,10);
      break; 
      default: 
        return 0; 
      break; 
    } 
  } 
  var status_html = "<div data-v-0a593618=\"\" data-v-7b37eb95=\"\" id=\"mhls\"><img style=\"width:100%;\" src=\""+url[randomNum(0,url.length-1)]+"\"> <span data-v-0a593618=\"\">洛谷娱乐</span><button data-v-86f36770=\"\" data-v-0a593618=\"\" type=\"button\" onclick=\"document.querySelector(\'section.side > div:nth-child(5)\').innerHTML=\'\';\" style=\"border-color: rgba(255, 255, 255, 0.5); color: rgb(255, 255, 255); background-color: rgba(0, 0, 0, 0.5);\">关闭</button></div>";
  function init() {
    var node = document.createElement('div');
    node.innerHTML = status_html;
    document.querySelector('section.side > div:nth-child(4)').insertAdjacentElement('afterend', node);
  }
  setTimeout(init, 3000);
})();